//package com.example.elasticsearchdemo.config;
//
//import org.elasticsearch.client.transport.TransportClient;
//import org.elasticsearch.common.settings.Settings;
//import org.elasticsearch.common.transport.InetSocketTransportAddress;
//import org.elasticsearch.transport.client.PreBuiltTransportClient;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.net.InetAddress;
//import java.net.UnknownHostException;
//
///**
// * @author： ygl
// * @date： 2019/07/01
// * @Description：
// */
////@Configuration
//public class EsConfig {
//
//
//    @Bean
//    public TransportClient client() throws UnknownHostException {
//        InetSocketTransportAddress node = new InetSocketTransportAddress(
//              InetAddress.getByName("localhost"),9300
//        );
//
////        Settings.builder().put("")
//
//        TransportClient client = new PreBuiltTransportClient(Settings.EMPTY);
//        client.addTransportAddress(node);
//        return client;
//    }
//}
